Fix a crash
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 7 Sep 2007 05:45:41 +0000 (05:45 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 7 Sep 2007 05:45:41 +0000 (05:45 +0000)
svn path=/trunk/; revision=18746

gdk-pixbuf/ChangeLog
gdk-pixbuf/io-tga.c

index 9676c9fd961a8fb7991f4d56b7f5fa602b26e94d..17c289d4e0f3c03d4e59a0b02cc0902bb109f69f 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-07  Matthias Clasen  <mclasen@redhat.com>
+
+       * io-tga.c (gdk_pixbuf__tga_stop_load): Handle pbuf 
+       being NULL.  (#468801, Sebastien Bacher)
+
 2007-07-21  Matthias Clasen  <mclasen@redhat.com>
 
        * === Released 2.11.6 ===
index 963c3a68703232fb6906d8cc57130d7c2f79d257..3a719c5426bfaf0326ff54f3ab070a96af302eac 100644 (file)
@@ -935,7 +935,8 @@ static gboolean gdk_pixbuf__tga_stop_load(gpointer data, GError **err)
        TGAContext *ctx = (TGAContext *) data;
        g_return_val_if_fail(ctx != NULL, FALSE);
 
-       if (!(ctx->hdr->flags & TGA_ORIGIN_UPPER) && ctx->run_length_encoded) {
+       if (!(ctx->hdr->flags & TGA_ORIGIN_UPPER) && 
+            ctx->run_length_encoded && ctx->pbuf) {
                pixbuf_flip_vertically (ctx->pbuf);
                if (ctx->ufunc)
                        (*ctx->ufunc) (ctx->pbuf, 0, 0,